﻿// clickable mouth that makes eating sound when pressed

using UnityEngine;
using System.Collections;

public class ClickableMouth : ClickableObject
{
	GameController gameController;

	// Use this for initialization
	void Start ()
	{
		gameController = GameObject.Find("GameController").GetComponent<GameController>();
	}
	
	// Update is called once per frame
	void Update ()
	{
	
	}

	override public void BeganTouch(Vector3 position)
	{
		// start playing eating sound
		Debug.Log ("munch munch munch");
		gameController.ChangeEnvironmentState(GameController.EnvironmentState.BOTTLE);

	}

	override public void MovedTouch(Vector3 position)
	{
	
	}

	override public void EndedTouch()
	{
		// stop playing eating sound
		Debug.LogWarning ("STOPPED EATING!!");
		gameController.ChangeEnvironmentState(GameController.EnvironmentState.STILL);
	}
}
